﻿
using Red.Core;

namespace Red.Controls.Depot.ViewModels
{
    public class ChangelistFileInfo : ViewModel
    {
        #region Data

        private bool _isChecked = true;
        private readonly ChangelistViewModel _changelistViewModel;

        #endregion Data

        #region Properties

        public bool IsChecked
        {
            get { return _isChecked; }
            set
            {
                if ( _isChecked == value )
                    return;

                _isChecked = value;
                _changelistViewModel.RefreshSelectionState();
                OnPropertyChanged();
            }
        }

        public string Path { get; set; }

        #endregion Properties

        #region C-tor

        public ChangelistFileInfo( ChangelistViewModel viewModel )
        {
            _changelistViewModel = viewModel;
        }

        #endregion C-tor
    }
}
